package com.dreamfire.display.display3D.core.event
{
	import com.dreamfire.display.display3D.core.DisplayObject3D;
	
	import flash.events.Event;
	
	public class Event3D extends Event
	{
		public static const ADDED:String = "added3D";
		public static const REMOVED:String = "removed3D";
		
		protected var _target:DisplayObject3D;
		protected var _currentTarget:DisplayObject3D;
		protected var _bubbles:Boolean;
		protected var _eventPhase:uint = 3;
		protected var stop:Boolean = false;
		protected var stopImmediate:Boolean = false;
		
		public function Event3D(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
		}
		
		override public function get bubbles():Boolean {
			return _bubbles;
		}
		
		override public function get eventPhase():uint {
			return _eventPhase;
		}
		
		override public function get target():Object {
			return _target;
		}
		
		override public function get currentTarget():Object {
			return _currentTarget;
		}
		
		override public function stopPropagation():void {
			stop = true;
		}
		
		override public function stopImmediatePropagation():void {
			stopImmediate = true;
		}
		
		override public function clone():Event {
			var result:Event3D = new Event3D(type, _bubbles);
			result._target = _target;
			result._currentTarget = _currentTarget;
			result._eventPhase = _eventPhase;
			return result;
		}
		
		override public function toString():String {
			return formatToString("Event3D", "type", "bubbles", "eventPhase");
		}
	}
}